/*
 * =====================================================================================
 *
 *       Filename:  cmd.c
 *
 *    Description:  AVL tree node content as cmd.
 *
 *        Version:  1.0
 *        Created:  2017/02/13 11:35:07
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Brook L. (), Brook_L@163.com
 *   Organization:  
 *
 * =====================================================================================
 */

#include <string.h>
#include <stdio.h>
#include "cmd.h"

/* 
 * <user: avl tree callback function, must be implemented by user>
 * compare between two contents
 */
int cmdCompare(Cmd *content1, Cmd *content2) {
    return strncmp(content1->cmd, content2->cmd, MAX_CMD_CHAR);
}

/* 
 * <user: avl tree callback function, must be implemented by user>
 * process when the content already exists during inserting
 */
void cmdInsertMatchProcess(Cmd *content) {
}

/* 
 * <user: avl tree callback function, must be implemented by user>
 * process when traverse the AVL tree
 */
void cmdTravProcess (Cmd *content) {
    printf("    \"%s\"\n", content->cmd);
}
